import request from '@/utils/request'

export default{

    searchList(page,size,cid){
        return request(
            {
                url:`/exam/searchlist/${page}/${size}/${cid}`,
                method:'get',
                baseURL:'http://api.exam.com/api/paper/'
            }
        )        
    },
   
    //获取分类级联选择器
    getOptions(){
        return request({
            url:`/category/cascader`,
            method:'get',
            baseURL:'http://api.exam.com/api/paper/'
        })
    },

    //获取用户试卷列表
    queryPageList(uId){
        return request({
            url:`pagelist`,
            method:'get',
            params:{"id":uId},
            baseURL:'http://api.exam.com/api/paper/exam/'
        })
    },

    //通过分类id获取试卷
    queryPageByCategory(categoryId){
        return request({
            url:`pagelist/${categoryId}`,
            method:'get',
            baseURL:'http://api.exam.com/api/paper/exam/'
        })
    },

    // 创建考试
    creatTest(test){
        return request({
            url:``,
            method:'post',
            data:test,
            baseURL:'http://api.exam.com/api/test'
        })
    },

    // 获取考试列表
    getTestList(id){
        return request({
            url:`list/${id}`,
            method:'get',
            baseURL:'http://api.exam.com/api/test/'
        })
    }
    

}
